package com.prs.crm.domain.cqunicom;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.BaseEntity;

/**
 * @author  WangTing
 *
 * 创建时间：2011-3-5 
 * 
 */

//////////送票员管理

@Entity
@Table(name="cq_sender")
public class Sender extends BaseEntity{
	
	private static final long serialVersionUID = 1L;
	
	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	
	private Integer id;
	
	 /**
	 *
	 * 姓名
	 */
	private String name;
	
	 /**
	 *
	 * 联系电话
	 */
	private String phone_No;
	
	 /**
	 *
	 * 所属公司
	 */
	private String company;
	
	 /**
	 *
	 * 备注
	 */
	private String  remark;
	
	/**
	 * 派单列表
	 */
	@OneToMany(mappedBy = "senderB")
	@Cascade({ org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Set<PieList> pieList;
	
	/**
	 * 所属电影院
	 * @return
	 */
	@ManyToOne
	private  Movie  movieSender;
	
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPhone_No() {
		return phone_No;
	}
	public void setPhone_No(String phone_No) {
		this.phone_No = phone_No;
	}
	public String getCompany() {
		return company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public String getRemark() {
		return remark;
	}
	
	public Movie getMovieSender() {
		return movieSender;
	}
	public void setMovieSender(Movie movieSender) {
		this.movieSender = movieSender;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public static long getSerialVersionUID() {
		return serialVersionUID;
	}
	public Set<PieList> getPieList() {
		return pieList;
	}
	public void setPieList(Set<PieList> pieList) {
		this.pieList = pieList;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	
	
}
